<template>
  <Header>管理系统
    <Button type="primary" size="small" @click="logout">登出</Button>
  </Header>
</template>

<script>
import { Header, Button } from 'element-ui'
export default {
  name: 'AdminHead',
  components: { Header, Button },
  data() {
    return {}
  },
  methods: {
    logout() {
      sessionStorage.removeItem('user_token')
      this.$router.replace('/login')
    }
  }
}
</script>

<style lang="scss">
.el-header {
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  position: relative;
  background-color: #fff;
  line-height: 60px;
}
</style>